package day20171102;

import java.util.Scanner;

/**
 * Created by AIR on 2017/11/2.
 */
public class Test {
    public static void main(String[] args) {
        int a;
        int b;
        while (true) {
            //接收用户的输入值
            Scanner scanner = new Scanner(System.in);
            System.out.println("please input 1st int:");
            a = scanner.nextInt();
            System.out.println("please input 2nd int:");
            b = scanner.nextInt();
            int c = 0;
            try {
                c = a / b;
            } catch (ArithmeticException e) {
                System.out.println("除数为零！");
            }


            System.out.println(a + "/" + b + "=" + c);

        }
    }
}
